<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    {css}
    {js}
<!--    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBqj3J7glENOqpjNEu4ZpVlO--P8OXj9p0&sensor=false&language=vi&libraries=places&callback=initialize"></script>-->
    <script type="text/javascript">
        function loadScript() {
            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.src = 'http://maps.googleapis.com/maps/api/js?key=AIzaSyBqj3J7glENOqpjNEu4ZpVlO--P8OXj9p0&sensor=false&language=vi&libraries=places&callback=initialize';
            document.body.appendChild(script);
        }

        function initialize(){
            var input = document.getElementById("searchTextbox");
            var autocomplete = new google.maps.places.Autocomplete(input);
            var address = document.getElementById("searchTextbox").value;
            google.maps.event.addListener(autocomplete, "place_changed", function () {
                var place = autocomplete.getPlace();
                var form = $(document.createElement( "form" )).attr( {"method": "post", "action": "{__SERVER}/map"} );
                $(document.createElement("input")).attr({ "type": "hidden", "name": "place", "value": document.getElementById("searchTextbox").value }).appendTo( form );
                form.appendTo( document.body ).submit();
            });

            if(typeof initialize1 == 'function'){
                initialize1();
            }
        }
        window.onload = loadScript;

    </script>
    <script type="text/javascript">
        function getDistrict(){
            $.get(
                "{__SERVER}/index/getDistrict",
                {district : $("#province").val()},
                function(data){
                    var district = document.getElementById("district");
//                        district.empty();
                    district.innerHTML = data;
                }
            )   ;
        }
    </script>
</head>
<body>





<div class="header">
    {user}
    <div class="headerc">

        {header}

        {mmenu}

        <a href="{__SERVER}/record/dangtin"> <div class="upload">Đăng Tin</div></a>

    </div>

</div>



{body}
</body>
</html>